Content Library Item File Info

Content Library Item File Info
Content Library Item File Info

The Content Library Item File Info schema provides information about a file in Content Library Service storage.

A file is an actual stored object for a library item. An item will have zero files initially, but one or more can be uploaded to the item.

JSON Example
{
    "checksum_info": {
        "algorithm": "string",
        "checksum": "string"
    },
    "name": "string",
    "size": 0,
    "cached": false,
    "version": "string",
    "file_download_endpoint": "string"
}
checksum_info
Optional

A checksum for validating the content of the file.

This value can be used to verify that a transfer was completed without errors.

A checksum cannot always be calculated, and the value will be missing or null if the file does not have content.

string
name
Required

The name of the file.

This value will be unique within the library item for each file. It cannot be an empty string.

integer As int64 As int64
size
Required

The file size, in bytes. The file size is the storage used and not the uploaded or provisioned size. For example, when uploading a disk to a datastore, the amount of storage that the disk consumes may be different from the disk file size. When the file is not cached, the size is 0.

boolean
cached
Required

Indicates whether the file is on disk or not.

string
version
Required

The version of this file; incremented when a new copy of the file is uploaded.

string As uri As uri
file_download_endpoint
Optional

The URL endpoint that can be used to download the file.

Eg URL: https://{vc}/cls/static/{libraryId}/{itemId}/{fileName}?version={version} Content Library Item File Info.version query param in the URL specifies the latest version of the file present in storage. When URL is hit with version query param, the file version specified in version query param is downloaded. The download will fail with 404 not found error if the specified version is no longer present in storage. If URL is hit without version query param, the latest file version present in storage is downloaded.

It is expected to provide API session i.e. vmware-api-session-id in header while using the URL to download the file. vmware-api-session-id can be obtained from POST /session operation Eg: wget --header="vmware-api-session-id: {sessionId}" fileDownloadEndpoint

This property was added in vSphere API 9.0.0.0.

missing or null if the file is not present in storage i.e Content Library Item File Info.cached is False or library item is of VMTX Template type (as download of VMTX template is not supported currently)